<template>
<div class="toast-wrap" v-show ="show">
  <div class="toast">
    {{message}}
  </div>
</div>
</template>
<script>
export default {
  name: 'toast',
  computed: {
    show () {
      return this.$store.state.toast.show
    },
    message () {
      return this.$store.state.toast.message
    }
  }
}
</script>

<style lang="less">
.toast-wrap{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex; 
  align-items: center; 
  justify-content: center;
  .toast{
    background: #000;
    border-radius: 4px;
    padding:10px;
    color: #fff;
    max-width: 80%;
    margin-top: 20em;
  }
}
</style>
